/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ru.jSkyRoom.manager;

import java.io.IOException;
import ru.jSkyRoom.manager.phase.StartPhase;
import skyproc.exceptions.BadRecord;

/**
 *
 * @author Rakev
 */
public class JSkyGlobal {

    private static JSkyGlobal instance = new JSkyGlobal();

    public static JSkyGlobal getInstance() {
        return instance;
    }

    private JSkyGlobal() {
    }

    public StartPhase begin() {
        return StartPhase.create();
    }

    public void end() throws IOException, BadRecord {
        if (getModManager().getActiveMod() != null) {
            ModExporter.getInstance().exportActiveMod();
        }
    }

    public void end(String pathToSave) throws IOException, BadRecord {
    }

    public ModManager getModManager() {
        return ModManager.getInstance();
    }

    public LocaleManager getLocaleManager() {
        return LocaleManager.getInstance();
    }
}
